<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width = device-width, initial-scale = 1.0, minimum-scale = 1.0, maximum-scale = 1.0, user-scalable = no" />
    <title>{$menu.menu_seo_title|default=$site_seo_title} {$site_name}</title>
    <meta name="keywords" content="{$menu.menu_seo_key|default=$site_seo_keywords}" />
    <meta name="description" content="{$menu.menu_seo_des|default=$site_seo_description}">
    {include file="public:head" /}
</head>

<link rel="stylesheet" href="{$yf_theme_path}public/css/innerpage.css">
<link rel="stylesheet" type="text/css" href="{$yf_theme_path}public/css/idangerous.swiper.css" />

<script type="text/javascript" charset="utf-8" src="{$yf_theme_path}public/js/idangerous.swiper-2.1.min.js"></script>
<script type="text/javascript" charset="utf-8" src="{$yf_theme_path}public/js/artdialog/dialog-plus-min.js"></script>
<script type="text/javascript" charset="utf-8" src="{$yf_theme_path}public/js/base.js"></script>
<script type="text/javascript" charset="utf-8" src="{$yf_theme_path}public/js/cart.js"></script>
<script src="{$yf_theme_path}public/js/share.js"></script>
<script type="text/javascript">
	$(document).ready(function(){
      //初始化幻灯片插件
	  var mySwiper = new Swiper('.swiper-container',{
		calculateHeight:true,
		resizeReInit:true,
		pagination:".pagination",
		autoplay:5000,
		paginationClickable:true
	  });
	});
</script>
 <script language="javascript">
 $(function(){
    $(document).attr("title",'{$site_seo_title}');
 });
</script>
<body>
<div class="current_pos">
		<div class="return"><a href="javascript:history.back(-1);"><i class="fa fa-chevron-left"></i></a></div>
		<h2><span>产品详情</span></h2>
        <div class="returnhome"><a href="__ROOT__/"><i class="fa fa-home"></i></a></div>
</div>


<div id="slider1" class="swiper-container">
        <div class="swiper-wrapper">
         {notempty name="$goods['thumb']"}
              <div class="swiper-slide swiper-slide-visible swiper-slide-active"> <img src="{$goods["thumb"]}"></div>
         {/notempty}
         {volist name="goods['img_list']" id="img" key="k"}
              <div class="swiper-slide"> <img src="{$img}">  </div>
         {/volist}
        </div>
        <div class="pagination">
            {notempty name="$goods['thumb']"} 
            <span class="swiper-pagination-switch swiper-visible-switch swiper-active-switch"></span>
            {/notempty}
            {volist name="goods['img_list']" id="img" key="k"}
            <span class="swiper-pagination-switch"></span>
            {/volist}
       </div>
</div>


  <form action="{:url("home/order/buy")}" method="post" id="orderbug" onSubmit="return checkorderform(this);">
<div class="shangpinxiangqing  clearfix">
      <div class="clear"></div>
   

      <div class="goods-btn">
		<h1 style="position:relative;">
            <a href="javascript:;" class="icon-carat-r">{$goods["goods_title"]}</a>
        </h1>
        <p class="subtitle"></p>
        <div class="price-box">
          <div>市场价：<s id="commodityMarketPrice">¥{$goods["price"]}</s></div>
          <div>销售价：<b id="commoditySellPrice">¥{if condition="empty($goods['price_'.$groupid])"}{$goods["price"]} {else/}{$goods["price_".$groupid]} {/if}</b></div>
        </div>
        
        <div id="goodsSpecBox" class="spec-box">
          <!--商品规格-->
          
          <!--/商品规格-->
        </div>
        
        <div class="input-box">
            购买数量：
            <div class="listbox">
              <a class="min" onClick="addCartNum(-1);">-</a>
              <input type="hidden" id="id" name="id" value="{$goods["id"]}">
              <input id="commoditySelectNum"  name="number" type="text" value="1" readonly>
              <a class="max" onClick="addCartNum(1);">+</a>
            </div>
        </div>
     </div>
     
     <div class="goods-item">
        <h2>商品参数</h2>
        <dl>
          <dt>库存情况：</dt>
          <dd id="commodityStockNum">{$goods.count_goods}件</dd>
        </dl>
          <dl>
              <dt>上架时间：</dt>
              <dd>{$goods.add_times|date="Y-m-d",###}</dd>
          </dl>
      </div>
      
      
      
       <div class="good_detail clearfix">
          <div class="header">产品详情</div>
              <div class="good_detail_con">
              {$goods["content"]}
              </div>
       </div>
     
</div>
       
    <div class="buygoods">
	<ul>
    	<li><a href="javascript:;" onClick="dosumbit();"><i class="fa fa-chevron-circle-right"></i><span>立即购买</span></a></li>
        <li class="cartgood"><a href="{:url('home/shop/index',["cate"=>$goods["cid"]])}"><i class="fa fa-share"></i><span>返回列表</span></a></li>
        
    </ul>
    </div>
 </form>





 
    
    
</div>
{include file="public:scripts"/}
<script language="javascript">

  $(function(){
	  $(".m-menu li").removeClass('current');
	  $(".m-menu a[href='{:url('home/shop/index')}']").parent().addClass('current');
  });
  
  
  function dosumbit(){
     $("#orderbug").submit();
  }
</script>
<script>
function checkorderform(o){
	return true;	
}
$(function(){
	$(".plus_btn").click(function(){
		var o = $(this).next();						  
		var number = o.val();							  
		if(isNaN(number)){
			o.val(1);		
		}else{
			if(number.length<4){
				number++;
				o.val(number);
			}
		}
	});		
	
	$(".minus_btn").click(function(){
		var o = $(this).prev();						   
		var number = o.val();							  
		if(isNaN(number)){
			o.val(1);		
		}else{
			if(number>1){
				number--;
				o.val(number);
			}
		}
	});
	
})
</script>
</body>
</html>